package com.dc.designPattern._0_设计原则._3_lsp.step1;

/**
 * Description: 里氏替换_原始案例_Client
 * @author: gdc
 * @date: 2021/7/23
 * @version 1.0
 */
public class Client {

    public static void main(String[] args) {
        A a = new A();
        System.out.println("11-3=" + a.sub(11, 3));
        System.out.println("1-8=" + a.sub(1, 8));
        System.out.println("-----------------------");

        B b = new B();
        System.out.println("11-3=" + b.sub(11, 3));

        //这里本意是求出 11-3
        System.out.println("1-8=" + b.sub(1, 8));
        System.out.println("11+3+9=" + b.func2(11, 3));
    }

}



